代写C++代码 代做C++程序 C++辅导 C++教学

C++网络家教 远程写代码 在线Debug 讲解答疑 不是中介,本人直接写

微信: ittutor QQ: 14061936 Email: ittutor@qq.com

导航

Design a class House that defines a house on a street

Here is my typed up version of the problem. I have tried to elaborate a bit on the book description of the problem, but if you have any questions just send me an email.


Design a class House that defines a house on a street. A House has an int house number and an Point location. The key member function is draw, which draws the house at location. The draw function should also write the house number on the house using the message object. Next, design a class Street. An object of type Street stores two House objects called first and last and the number of houses, num_houses, on the street which is an int. Street also has a member function called plot. Plot should draw evenly spaced houses starting at first ending with last. The number of houses plotted is equal to number of houses on the street. Use these classes in a graphics program in which the user clicks with the mouse on the locations of the first and last house, then enters the house numbers of the first and last house, and the number of houses on the street. Then the entire street is plotted.

分页: 首页 1 尾页